import React from 'react';
import { connect } from 'dva';
import MoreSelectClassify from '../../components/Common/MoreSelectClassify';


function moreSelectClassify({ dispatch, app, content }) {
  function getResult(resultValue) {
    /* 更改返回值 */
    dispatch({ type: 'app/changePpopupPane', payload: { resultValue } });
  }

  function getSecondResult(resultValue) {
    /* 更改返回值 */
    dispatch({ type: 'app/changeSecondPpopupPane', payload: { resultValue } });
  }

  function removeSecondModalPane(changePanes) {
    dispatch({ type: 'app/removeSecondModalPane', payload: { changePanes } });
  }

  const moreSelectClassifyProps = {
    app,
    content,
    dispatch,
    handleGetResult: getResult,
    handleGetSelfResult: getSecondResult,
    removeSecondModalPane,
  };

  return (
    <MoreSelectClassify {...moreSelectClassifyProps} />
  );
}

export default connect(({ app, content }) =>
  ({ app, content }))(moreSelectClassify);
